// counter.h（接口）
typedef struct Counter Counter;
Counter* counter_create();
void counter_increment(Counter* c);
int counter_get(Counter* c);

// counter.c（实现）
struct Counter { int value; };
Counter* counter_create() { return malloc(sizeof(Counter)); }
void counter_increment(Counter* c) { c->value++; }
int counter_get(Counter* c) { return c->value; }